<%@ page language="java" contentType="text/html; charset=UTF-8"
	isELIgnored="false" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="f" %>
<%@ taglib uri="/mytag" prefix="yjd"%>
<script	src="${requestScope.FPWEB.staticRootPath }/Js/Plugins/Echarts/echarts.min.js"></script>

<div class="wrap">
<div class="J_Chart_Panel">
		<div class="h_a1" style="clear: both;">
			<span class="title">  积分数据</span>
			<div class="yjd-tip">
				<div style="width:550px;">
				① 总获得积分 ： 平台所有用户获得积分，包含各方式获得的积分（含过期的和已使用的）<br>
				② APP签到总积分：通过安卓和iOS签到获得的总积分（含过期的和已使用的）<br>
				③ 微站签到总结分：通过微站/wap签到获得的总积分（含过期和已使用的）<br>
				④ PC签到总积分：通过PC端签到获得的总积分（含过期和已使用的）<br>
				⑤ 总消耗积分：用户在所有客户端消耗的总积分（不含自动过期作废积分）<br>
				⑥ 总过期积分：指平台中已经过期的总积分<br>
				⑦ APP签到人数：指在一定时间内在APP（安卓和iOS加总）客户端签到的总用户人数，去重。<br>
				⑧ 微站签到人数：指在一定时间内在微站/WAP客户端签到的总用户人数，去重。<br>
				⑨ PC签到人数：指在一定时间内在PC客户端签到的总用户人数，去重。<br>
				⑩ 投资获得总积分：指在一定时间内用户通过投资定期标的获得的总积分。<br>
				</div>
			</div>
		</div>
		
	<div >
		<form method="post" id="sumary" autocomplete="off" action="${requestScope.FPWEB.rootPath }/jf/summary${requestScope.FPWEB.urlStuff}" >
			<div class="search_type cc">
				<label>起始时间：</label> <input type="input" max="${end }" name="start" min="${start }"
					class="input length_1 mr10 J_date" value="${start }">
				<label>结束时间：</label> <input type="input" max="${end }" name="end" min="${start }"
					class="input length_1 mr10 J_date" value="${end }">
				<button id="search" type="button" class="btn length_1">搜索</button>
			</div>
		</form>
		<div class="count cc" id="cbox">
			<div class="c-box">
				<div class="c-box-head">总获得积分</div>
				<div class="c-box-con">
					<span name="number" id="total_point" class="number">0</span> 
				</div>
			</div>
			<div class="c-box">
				<div class="c-box-head">APP签到总积分</div>
				<div class="c-box-con">
					<span name="number" id="appsign_point" class="number">0</span> 
				</div>
			</div>
			<div class="c-box">
				<div class="c-box-head">微站签到总积分</div>
				<div class="c-box-con">
					<span name="number" id="wapsign_point" class="number">0</span> 
				</div>
			</div>
			<div class="c-box">
				<div class="c-box-head">PC签到总积分</div>
				<div class="c-box-con">
					<span name="number" id="pcsign_point" class="number">0</span> 
				</div>
			</div>
			<div class="c-box">
				<div class="c-box-head">投资获得总积分</div>
				<div class="c-box-con">
					<span name="number" id="invest_point" class="number">0</span> 
				</div>
			</div>
			<div class="c-box">
				<div class="c-box-head">总消耗积分</div>
				<div class="c-box-con">
					<span name="number" id="cost_point" class="number">0</span> 
				</div>
			</div>
			<div class="c-box">
				<div class="c-box-head">总过期积分</div>
				<div class="c-box-con">
					<span name="number" id="passed_point" class="number">0</span> 
				</div>
			</div>
			<div class="c-box">
				<div class="c-box-head">APP签到人数</div>
				<div class="c-box-con">
					<span name="number" id="appsign_count" class="number">0</span> 
				</div>
			</div>
			<div class="c-box">
				<div class="c-box-head">微站签到人数</div>
				<div class="c-box-con">
					<span name="number" id="wapsign_count" class="number">0</span> 
				</div>
			</div>
			<div class="c-box">
				<div class="c-box-head">PC签到人数</div>
				<div class="c-box-con">
					<span name="number" id="pcsign_count" class="number">0</span> 
				</div>
			</div>
		</div>
	</div>
	</div>
	<li>
	<script>
		YJD.use('AppAdminCommon');
		YJD.use('AppBICommon');
		var form=$("#sumary");
		$("#search").click(function(){
			addCompareData();
		});
		function addCompareData() {
			var cbox=$("#cbox");

			var boxes=cbox.find(".c-box");
			boxes.each(function(index,e){
				var val=$(this).find('span[name=number]');
				val.text("Loading...");
			});
			$.ajax({
			type: "post",
			url: form.attr("action"),
			data: form.serializeArray(), // 你的formid
			error: function(request) {
				alert("连接失败！");
			},
			success : function(result) {
				if (result.state == 1) {
					console.log(result);
					$("#total_point").text(
							result.data.total_point);
					$("#appsign_point").text(
							result.data.appsign_point);
					$("#wapsign_point").text(
							result.data.wapsign_point);
					$("#pcsign_point").text(
							result.data.pcsign_point);
					$("#invest_point").text(
							result.data.invest_point);
					$("#cost_point").text(
							result.data.cost_point);
					$("#passed_point").text(
							result.data.passed_point);
					$("#appsign_count").text(
							result.data.appsign_count);
					$("#wapsign_count").text(
							result.data.wapsign_count);
					$("#pcsign_count").text(
							result.data.pcsign_count);
				}
			}
		});
		}
		 addCompareData();
	</script>
</div>